package com.ruoyi.cs.mapper;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.ruoyi.cs.domain.TFringeBenefits;
import org.apache.ibatis.annotations.Param;

public interface TFringeBenefitsMapper {

    /**
     * 查询列表
     *
     * @param tFringeBenefits
     * @return
     */
    public List<TFringeBenefits> selectTFringeBenefitsList(TFringeBenefits tFringeBenefits);

    /**
     * 查询记录
     *
     * @param userId
     * @return
     */
    public List<TFringeBenefits> queryRecentByUserId(String userId);

    /**
     * 查询最近一条
     *
     * @param userId
     * @return
     */
    public TFringeBenefits queryRecentOneByUserId(String userId);


    public int insertSelective(TFringeBenefits tFringeBenefits);

    /**
     * 查询用户积分
     *
     * @param userId
     * @param beginTime
     * @param endTime
     * @return
     */
    public BigDecimal selectUserIntegral(@Param("userId") String userId, @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    /**
     * 领取记录
     *
     * @param tFringeBenefits
     * @return
     */
    public List<TFringeBenefits> receivingRecords(TFringeBenefits tFringeBenefits);

    /**
     * 查询用户最近一条领取记录
     *
     * @return
     */
    public List<TFringeBenefits> selectLatestCollectionRecord();

    /**
     * 统计用户历史领取
     * @param userId
     * @return
     */
    public BigDecimal countRecordgoldCoins(String userId);

    /**
     * @Desc: 统计领取次数
     * @author: zz
     * @date: 2023/12/14
     */
    public long countReceiveDate(@Param("userId") String userId,@Param("receiveDate") String receiveDate);
}